# -*- coding: utf-8 -*-
# @Date   : 2020/3/27
# @File   : InvestOutNum.py
# @Author : zhaochen
'''eof
name:目标公司投资其它企业数量
code:InvestOutNum
tableName:
columnName:
groups:关联方
dependencies:EG_BBD
type:常用指标
dataSourceType:在线指标
description:
eof'''

import sys

reload(sys)
sys.setdefaultencoding('utf-8')


def float_check(num):
    try:
        float(num)
        return True
    except:
        return False


def InvestOutNum():
    try:
        InvestOutNum = EG_BBD["InvestOutNum"]
        if float_check(InvestOutNum):
            return InvestOutNum
        elif InvestOutNum == '':
            return 0
        else:
            return u'缺失值'
    except:
        return u'缺失值'


result = InvestOutNum()